﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RoleListGridGrid.ascx.cs" 
Inherits="UILGestion.Control.RoleListGridGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    function Cancel() {
        $.unblockUI();
    }
    function ToggleTagCallback(e) {
        var result = eval('(' + e + ')');
        $('#' + result.ControlId).text(result.HasTag ? "Remove" : "Add");
    }
</script>
<asp:Panel runat="server" ID="PanelRol" Font-Size="X-Small" Font-Names="Arial" >

<asp:DataPager ID="pager" PagedControlID="rolListView" runat="server">

    <Fields>
    
             <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="rolListView" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server" class="yui-grid">
            <tr id="Tr1" runat="server">
                <th id="Th1" runat="server">
                    <asp:LinkButton ID="lb2" CommandName="Sort" CommandArgument="descripcion" runat="server">Descripcion</asp:LinkButton>
                </th>
                <th id="Th3" runat="server">
                    <asp:LinkButton ID="lb3" CommandName="Sort" CommandArgument="activo" runat="server">Activo</asp:LinkButton>
                </th>
                 <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" CommandArgument="nivelPresupuesto" runat="server">Nivel<br />Presup.</asp:LinkButton>
                </th>
                 <th id="Th4" runat="server">
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort" CommandArgument="nivelComparativo" runat="server">Nivel<br />Comp.</asp:LinkButton>
                </th>
                 <th id="Th5" runat="server">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" CommandArgument="montoComparativo" runat="server">Monto<br />Comp.</asp:LinkButton>
                </th>
                 <th id="Th6" runat="server">
                    <asp:LinkButton ID="LinkButton4" CommandName="Sort" CommandArgument="bitAprobarOrdenCompra" runat="server">Aprobar<br />OC</asp:LinkButton>
                </th>
                 <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" CommandArgument="bitAprobarOrdenCompra" runat="server"></asp:LinkButton>
                </th>
               
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#eee":"#fff" %>'>
            <td Width="200px">
            <asp:HyperLink ID="PersonLink" runat="server" NavigateUrl='<%# Eval("idInternal", "~/Seguridad/RolReadForm.aspx?id={0}") %>'
             Text='<%# Eval("descripcion") %>'></asp:HyperLink>
            </td>
            <td>
             <input id="Checkbox1" type="checkbox" runat="server" 
                checked= '<%# Eval("activo")%>' disabled="disabled" />
                               
            </td>
            <td>


                <%# Eval("nivelPresupuesto")%><br />
                
            </td>
            <td>
                <%# Eval("nivelComparativo")%><br />
                
            </td>
            <td>
                <%# Eval("montoComparativo")%><br />
                
            </td>
            <td>
            <input id="Checkbox2" type="checkbox" runat="server" 
                checked= '<%# Eval("bitAprobarOrdenCompra")%>' disabled="disabled" />
                
                
            </td>
              <td >
                   <asp:ImageButton runat= "server" 
               
                 Target="_self"  ID="Hyperlink1"
                PostBackUrl='<%# "~/Seguridad/RolInsertForm.aspx?type=E&id=" +
                 DataBinder.Eval (Container.DataItem,"idInternal").ToString()%>' 
                 CssClass="GridIcon ico-edit" BorderStyle="None" ImageUrl="~/Images/listing/ico-edit.png"
               />  
                                  
            </td>
           
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                    <h2 style="color: Red">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>

</asp:Panel>

